From: Florian Müllner Date: Thu, 24 Jan 2013 11:14:19 +0000 (+0100) Subject: workspacesView: Always zoom out switcher when using static workspaces X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4571 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6d011a37005068a76c056fb27e4cd41e3a98a051;p=gnome-shell.git workspacesView: Always zoom out switcher when using static workspaces We always leave the workspace switcher zoomed out when we can assume that the user is actually making use of workspaces. For the default dynamic workspace behavior, we make this assumption when more than two workspaces are in use (e.g. at least two workspaces contain windows plus an empty one at the end). However this test does not make sense when using static workspaces - in that case, not using workspaces would be indicated by a workspace number of 1 (in which case the entire switcher is hidden completely), so add a check for dynamic workspaces to the condition. https://bugzilla.gnome.org/show_bug.cgi?id=695126 --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 4a528e2ff..0906885ac 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -2,6 +2,7 @@ const Clutter = imports.gi.Clutter; const Lang = imports.lang; +const Meta = imports.gi.Meta; const St = imports.gi.St; const Shell = imports.gi.Shell; @@ -248,7 +249,7 @@ const ThumbnailsSlider = new Lang.Class({ _getAlwaysZoomOut: function() { // Always show the pager when hover, during a drag, or if workspaces are // actually used, e.g. there are windows on more than one - let alwaysZoomOut = this.actor.hover || this.inDrag || global.screen.n_workspaces > 2; + let alwaysZoomOut = this.actor.hover || this.inDrag || !Meta.prefs_get_dynamic_workspaces() || global.screen.n_workspaces > 2; if (!alwaysZoomOut) { let monitors = Main.layoutManager.monitors;